import Vue from 'vue'
import FastClick from 'fastclick'

FastClick.attach(document.body)
import router from './router'
import store from './store'

Vue.config.productionTip = false
import WSLOAN from '@wsloan/wsloan/src/entries/app.new.js'
WSLOAN.set && WSLOAN.set({
  needUserid: false, // 是否需要获取温商贷用户信息
  needTj: false // 是否开启默认统计
})

import {
  AlertPlugin,
  ConfirmPlugin,
  ToastPlugin
} from 'vux'


Vue.use(WSLOAN, {
  AlertPlugin,
  ConfirmPlugin,
  ToastPlugin
})

import {
  Group,
  XInput,
  XButton,
  Flexbox,
  FlexboxItem,
  XHeader,
  Tab,
  TabItem,
  Cell,
  Toast,
  Checker,
  CheckerItem,
  CheckIcon,
  Popup,
  TransferDom,
  Loading,
  Selector,
  Confirm
} from 'vux'

import { Loadmore } from 'mint-ui';

Vue.component('confirm', Confirm)
Vue.component('selector', Selector)
Vue.component('group', Group)
Vue.component('x-input', XInput)
Vue.component('x-button', XButton)
Vue.component('flexbox', Flexbox)
Vue.component('flexbox-item', FlexboxItem)
Vue.component('x-header', XHeader)
Vue.component('tab', Tab)
Vue.component('tab-item', TabItem)
Vue.component('cell', Cell)
Vue.component('toast', Toast)
Vue.component('checker', Checker)
Vue.component('checker-item', CheckerItem)
Vue.component('check-icon', CheckIcon)
Vue.component('popup', Popup)
Vue.directive('transfer-dom', TransferDom)
Vue.component('loading', Loading)

Vue.component(Loadmore.name, Loadmore);


wsloan.statistic().dapi();
var App = require('./App')
if (!App.name) App = App.default
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {
    App
  }
})
